<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2021/9/11
  Time: 13:30
  To change this template use File | Settings | File Templates.
--%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<html>
<head>
    <base href="<%=basePath%>"/>
    <title>库存列表</title>
</head>
<body>
<center>
    <h1>库存列表</h1>
    <a href="<%=basePath%>view/system/stock/addStock.jsp">增加</a>
    <hr>
    <table width="80%" border="1">
        <tr>
            <td>ID</td>
            <td>商品名</td>
            <td>商品价格</td>
            <td>库存数量</td>
            <td>库存类型</td>

            <td colspan="3">操作</td>
        </tr>
        <c:forEach items="${stock_dbList}" var="stock">
            <tr>
                <td>${stock.id}</td>
                <td>${stock.goodsName}</td>
                <td>${stock.goodsPrice}</td>
                <td>${stock.stockNum}</td>
                <td>${stock.stockType}</td>


                    <td><a href="<%=basePath%>stockController/delete.do?stockIdStr=${stock.id}">删除</a></td>
                    <td><a href="<%=basePath%>stockController/updateUI.do?stockIdStr=${stock.id}">修改</a></td>
                <td><a href="<%=basePath%>purchaseController/addUI.do?goodsName=${stock.goodsName}">购买</a></td>



            </tr>
        </c:forEach>
    </table>
    <P>&nbsp;</P>
    <input type="button" value="首页">
    <input type="button" value="下一页">
    <input type="button" value="1">
    <input type="button" value="2">
    <input type="button" value="3">
    <input type="button" value="4">
    <input type="button" value="5">
    <input type="button" value="6">
    <input type="button" value="7">
    <input type="button" value="8">
    <input type="button" value="9">
    <input type="button" value="10">
    <input type="button" value="上一页">
    <input type="button" value="首页">
</center>
</body>
</html>
